package org.arkeologgr.appening;

import org.arkeologgr.appening.dataacess.DataAccessManager;
import org.arkeologgr.appening.dataacess.GPSDataManager;
import org.arkeologgr.appening.Services.BackgroundSearchService;


import android.app.Application;
import android.content.Intent;

public class AppeningApplication extends Application{
	
	/*
	 * kjhkhk
	 * (non-Javadoc)
	 * @see android.app.Application#onCreate()
	 */
	public void onCreate(){
		//Set up resources needed to run the application
		GPSDataManager.setup(this);
		DataAccessManager.setup();
		Intent intent = new Intent(this, BackgroundSearchService.class);
		startService(intent);
	}
	
	/*
	 * (non-Javadoc)
	 * @see android.app.Application#onTerminate()
	 */
	public void onTerminate(){
		//Shutdown hook, release resources
		GPSDataManager.tearDown();
		DataAccessManager.tearDown();
		
		//backgroundManager.doUnbindService();
	}

}
